﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Data;

namespace DAL
{
    public class SpredInfoDAL
    {

        public DataSet GetDataSet(string StrSQL)
        {
            DataSet dstemp = new DataSet();
            dstemp = SqlHelper.ExecuteDataSet(SqlHelper.SQLConnectionString, CommandType.Text, StrSQL, null);
            return dstemp;
        }

        public DataSet getSprid()
        {

            DataSet ds = new DataSet();

            string sql = "SELECT *    from  itemsprinfo  left join moneydiffinfo on moneydiffinfo.spid=itemsprinfo.spred_group " +
           " left join GROUPINFO on itemsprinfo.groupid=groupinfo.group_id left join shopinfo on  shopinfo.shop_id=itemsprinfo.itemcode   ";

          
            ds = GetDataSet(sql);
            return ds;

        }


        public DataSet getCustomer()
        {

            DataSet ds = new DataSet();

            string sql = "SELECT *    from  customer";


            ds = GetDataSet(sql);
            return ds;

        }
    }
}
